﻿@using System.Globalization
@model BabyShop.Site.Models.Product

@{
    ViewBag.Title = Model == null ? "ProductDetail" : Model.ProductTitle;
    Layout = "~/Views/Shared/_DefaultLayout.cshtml";
}
@section HeaderScript{
    <link type="text/css" rel="stylesheet" href="@Url.Content("~/Content/Default_W.css")"/>
    <link type="text/css" rel="stylesheet" href="@Url.Content("~/Content/Product.css")"/>
}
@Html.Action("WebSiteLocation", "Menu")
<div class="w container">
    <aside class="left">
        @Html.Partial("~/Views/Partial/_Contact.cshtml")
    </aside>
    <div class="rightExtra">
    @if (Model != null) {
        <div id="productTitle">
            <h1>@Html.DisplayFor(m => m.ProductTitle)</h1>
        </div>
        <div id="preview">
            <div id="imgContainer" class="jqzoom" onclick="javascript:void(0);">
                <img alt="@(Model.ProductName)" src="@(Model.ProductPhoto)" width="350" height="350"/>
            </div>
            <div id="imgSlider" style="display: none;">
                <div id="slideLeft" class="control"></div>
                <div id="slideRight" class="control"></div>
                <div id="slideList"></div>
            </div>
            <div class="links">
                <b></b>
                @Html.ActionLink("点击查看大图", "ViewBigPhoto", "Product", new { keyGuid = Model.ProductGuid },
                         new { @class = "enlarge", target = "_blank" })
            </div>
        </div>
        <ul id="summary">
            <li>
                @Html.LabelFor(m => m.ProductCode)：
                @Html.DisplayFor(m => m.ProductCode)
            </li>
            <li>
                @Html.LabelFor(m => m.Price)：
                @Model.Price.ToString("C", CultureInfo.CurrentCulture)
            </li>
            <li class="clearfix">
                <span class="fl">商品评分：</span>
                <div class="fl"></div>
            </li>
        </ul>
        <div id="choose">
            <dl class="amount">
                <dt>　我要买：</dt>
                <dd>
                    <a href="javascript:void(0)" onclick="setAmount.reduce('#pamount')" class="reduce">-</a>
                    <input type="text" onkeyup="setAmount.modify('#pamount')" id="pamount" value="1" />
                    <a href="javascript:void(0)" onclick="setAmount.add('#pamount')" class="add">+</a>
                </dd>
            </dl>
            <div class="btns">
                <a href="@Url.Action("AddIntoCar", "Product")" onclick="javascript:void(0);" id="InitCartUrl" class="btn-append">添加到购物车</a>
                <span class="ui-helper-clearfix"></span>
            </div>
        </div>
        <span class="ui-helper-clearfix"></span>
        <div id="detail">
            <ul class="tab">
                <li class="curr">商品介绍<span></span></li>
                <li>规格参数<span></span></li>
                <li>隐私保护<span></span></li>
                <li>售后服务<span></span></li>
            </ul>
            <div class="mc fore">
                <div class="content">
                    @MvcHtmlString.Create(@Model.ProductIntro)
                </div>
            </div>
            <div id="state">
                <strong>权利声明：</strong><br>
                本商城上的所有商品信息、客户评价、商品咨询、网友讨论等内容，是本商城重要的经营资源，未经许可，禁止非法转载使用。
            </div>
        </div>
    }
    </div>
    <span class="ui-helper-clearfix"></span>
</div>

@section FooterScript{
<script type="text/javascript">
    $(function () {
        $('#detail>.tab>li').click(function () {
            var $self = $(this);
            $self.parent().find('li').removeClass('curr');
            $self.addClass('curr');
        });
    })
</script>
}